package world;

import java.awt.Color;
import java.awt.Graphics2D;

import world.camera.Camera;

/**
 * defines the game world, the main game engine code is here
 * <br><br>
 * mainly the world manages its associated network objects (see {@link world.NetworkObject}),
 * it keeps them up to date and announces changes to listening clients (ie, the associated
 * {@link network.networkProfile.NetworkProfile network profiles})
 * <br><br>
 * the world should be controlled by a subclass of {@link network.networkManager.NetworkManager},
 * this will connect the world with other worlds; for simplicity there will be only 1 master world
 * that has the ability to create network objects, it may however grant ownership of those objects
 * out to individual connected client worlds
 * <br><br>
 * note: a more complicated setup where network object IDs are assigned using an associated originating
 * address as well as a short ID is possible (and even feasible). however, it would require more work to
 * write and the pay off does not seem to be that great at present. the main advantage is that the network would require
 * no 'master' server world, instead each world could be a master of some objects and listen for updates on others;
 * the main disadvantage is that if a client leaves all its owned objects must be transfered (or, if client is dropped,
 * there must be a system in place for inferring all previous values and splitting the owned units accross the existing
 * clients, this could be the most difficult portion to plan and write in order to implement distributed worlds)
 * @author jack
 *
 */
public class World
{
	public World()
	{
		
	}
	public void drawWorld(Graphics2D g, Camera c)
	{
		//draws the background
		g.setColor(new Color(0, 142, 0)); //a nice dark green
		g.fillRect(0, 0, c.getPhysicalViewDim()[0], c.getPhysicalViewDim()[1]);
	}
}
